package vikaa.ui;

import vikaa.wowo.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ChoosePhoto extends Activity{
	private LinearLayout backBtn;
	private ImageView chooseBtn;
	private TextView titleTv;
	private String sid;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mywowo_photo_choose);
		Intent i = getIntent();
		sid = i.getExtras().getString("sid");
		initview();
		titleTv.setText(i.getExtras().getString("spacename"));
	}
	private void initview(){
		backBtn = (LinearLayout)findViewById(R.id.backBtn);
		backBtn.setOnClickListener(new clickListener());
		chooseBtn = (ImageView)findViewById(R.id.chooseBtn);
		chooseBtn.setOnClickListener(new clickListener());
		titleTv = (TextView)findViewById(R.id.titleTv);
	}
	class clickListener implements OnClickListener{
		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch(v.getId()){
			case R.id.backBtn:
				finish();
				break;
			case R.id.chooseBtn:
				Intent i = new Intent(ChoosePhoto.this,ChoosePhotoList.class);
				i.putExtra("sid", sid);
				startActivity(i);
				finish();
				break;
			}
		}
	}
}
